<style scoped lang="scss">
.admin_container {
  overflow-y: auto;
  position: absolute;
  top: 70px;
  right: 0;
  bottom: 0;
  left: 240px;
  padding: 10px 20px;
  transition: all 300ms ease-in-out;
  &.mini {
    left: 64px;
  }
}
</style>

<template>
  <div class="admin_container" :class="{ mini: menuCollapse }">
    <el-breadcrumb class="pb10" separator-class="el-icon-arrow-right">
      <el-breadcrumb-item
        v-for="(item, index) in currentMenu"
        :key="index"
        :to="{ path: item.url }"
        >{{ item.name }}
      </el-breadcrumb-item>
    </el-breadcrumb>
    <slot></slot>
  </div>
</template>

<script>
import { mapState } from "vuex";
import { stateTypes } from "../../store/admin";
export default {
  name: "AdminContainer",
  computed: {
    ...mapState("admin", [stateTypes.menuCollapse, stateTypes.currentMenu])
  }
};
</script>
